Fix/df 1126 update metadata no draft + remove versions array#821
Conversation
….com/DEFRA/forms-manager into fix/df-1126-update-metadata-no-draft
|
alexluckett
left a comment
There was a problem hiding this comment.
I can't see the code relevant to "Allows metadata to be changed even if no draft form definition" - can you point me to it please?
| * @param {FormMetadata} metadata | ||
| * @param {FormMetadata} oldMetadata | ||
| */ | ||
| export async function publishFormOfflineUpdatedEvent(metadata, oldMetadata) { |
There was a problem hiding this comment.
intentionally removed? changes to "offline" auditing seem out of scope of this PR?
There was a problem hiding this comment.
Realised it was unused code. The audit event is still published but not via this method. I made a slight change to the auditing for the 'take offline'. Arguably this should have been done in a separate PR so as not to pollute things here.
|
When attempting to make a metadata change when no draft (e.g. changing the contact details) gives this stack trace: The fix in this PR is here https://github.com/DEFRA/forms-manager/pull/821/changes#diff-b9a0e6e2b5e2bab613dd6e8d0b78f6c655680f622eb6af7d8ab402ea90cb5edaL236 which no longer versions the change (which tries to access the draft definition - which doesn't exist). |



versionsfrom all metadata